
*** Koliev et al:  The Impact of Climate Shaming - REPLICATION *** 

* use "INGOshaming.dta", clear

xtset ccode year


** TABLE 2  in the paper ** 

drop if year<1990
drop if year>2020


logistic climatelaw_dummy  l2.NGO_shaming_Climate  i.year, cluster(ccode)
 outreg2 using T2.doc, dec(3) word label drop (i.year) eform cti( ratio) replace 

logistic climatelaw_dummy  l2.NGO_shaming_Climateln i.year, cluster(ccode)
  outreg2 using T2.doc, dec(3) word label drop (i.year) eform cti(ratio) append 

logistic climatelaw_dummy  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l. 	co2_per_capitaln i.pt_federal l.wdi_popurb  i.year,  cluster(	ccode) 
 outreg2 using T2.doc, dec(3) word label drop (i.year) eform cti(ratio) append 

logistic climatelaw_dummy  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year,  cluster(ccode)
 outreg2 using T2.doc, dec(3) word label drop (i.year) eform cti( ratio) append 
 
xtlogit climatelaw_dummy  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln l.wdi_popurb i.year _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws, fe or
 outreg2 using T2.doc, dec(3) word label drop (i.year) eform cti( ratio) append 


** Figure 1 in the paper 
drop if year<1990
drop if year>2020 
collapse (sum)  climatelaws, by(year)
line climatelaws year


** Figure 2 in the paper 
  
use "INGOshaming.dta", clear

drop if year<1990
drop if year>2020
collapse (count)  NGO_shaming_Climate, by(year)
line NGO_shaming_Climate year


  
** FIGURES 4A to 4C  in the paper ** 

 use  "INGOshaming.dta", clear


 * Democracy 
 logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
  margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.v2x_libdem =(0.005(0.1)0.892)) force
		marginsplot, recast(line) recastci(rarea) ylin(0)
		
  * Trade openness
 logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.wdi_trade l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year , cluster(ccode)
  margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.wdi_trade =(0.1(80)430))  force
		marginsplot, recast(line) recastci(rarea) ylin(0)
	
   * Climate agreements 
 logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.Climate_Agreement l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
	margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.Climate_Agreement  =(0(1)4))   force
		marginsplot, recast(line) recastci(rarea) ylin(0)
  

  

  


  
  
  
  

  
  *** ONLINE APPENDIX *** 
  
  

  *********##### TABLE A4 + Figure A1 and Figure A2. 
  
* v2x_cspart
logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.v2x_cspart l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
   outreg2 using Ta4.doc, dec(3) word label drop (i.year) eform cti( ratio) replace 
   
   margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.v2x_cspart  =(0.03(0.24)0.99))   force
		marginsplot, recast(line) recastci(rarea) ylin(0)
  

*v2xcs_ccsi
logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.v2xcs_ccsi l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
    outreg2 using Ta4.doc, dec(3) word label drop (i.year) eform cti( ratio) append 
	   
	   margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.v2xcs_ccsi  =(0.008(0.28)0.98))   force
		marginsplot, recast(line) recastci(rarea) ylin(0)
		


  
  ********###### Table A5
  
  
 * Democracy 
 logistic climatelaw_dummy  c.l2.NGO_shaming_Climate##c.l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
   outreg2 using Robustness1_1.doc, dec(3) word label drop (i.year) eform cti( ratio) replace 

 
  * Trade openness
 logistic climatelaw_dummy  c.l2.NGO_shaming_Climate##c.l.wdi_trade l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year , cluster(ccode)
   outreg2 using Robustness1_1.doc, dec(3) word label drop (i.year) eform cti( ratio) append 

  
   * Climate agreements 
 logistic climatelaw_dummy  c.l2.NGO_shaming_Climate##c.l.Climate_Agreement l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
   outreg2 using Robustness1_1.doc, dec(3) word label drop (i.year) eform cti( ratio) append 


  
  
  ********###### Table A6
  
	
  reg NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.wdi_trade l.e_migdppcln l.e_migdpgro l.co2_per_capitaln l.populationln l.domesticENGOs l.NGO_shaming_Climateln i.year,cluster (ccode)
outreg2 using ta6.doc, dec(3) word label drop (i.year) replace 

nbreg NGO_shaming_Climate l.v2x_libdem l.Climate_Agreement l.wdi_trade l.e_migdppcln  l.e_migdpgro l.co2_per_capitaln l.populationln l.domesticENGOs l.NGO_shaming_Climate i.year, cluster(ccode)
outreg2 using ta6.doc, dec(3) word label drop (i.year) append

*CONTROL FUNCTION APPROACH 

// First stage: Regress shaming on determinants
reg NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.wdi_trade l.e_migdppcln l.e_migdpgro l.co2_per_capitaln l.populationln l.NGO_shaming_Climateln i.year, cluster(ccode)
outreg2 using ta6.doc, dec(3) word label drop (i.year) append 


// Predict residuals
predict residuals, residuals

// Second stage: Regress outcome on shaming, controls, and residuals
logit climatelaw_dummy residuals l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year,  cluster(ccode)
outreg2 using ta6.doc, dec(3) word label drop (i.year) append 

  
  
   ********###### Table A7
   
 nbreg climatelaws  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year ,  cluster(ccode)
outreg2 using ta7.doc, dec(3) word label drop (i.year) replace 

xtnbreg climatelaws  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year ,  fe 
outreg2 using ta7.doc, dec(3) word label drop (i.year) append 
  

  
  
  
   ********###### Table A8 
   
   

logistic climatelaw_dummy  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year  if ccode !=2,  cluster(ccode)
outreg2 using Robustness3.doc, dec(3) word label drop (i.year) replace 


logistic climatelaw_dummy  l2.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year  if ht_region !=5,  cluster(ccode)
	outreg2 using Robustness3.doc, dec(3) word label drop (i.year) append 


logistic climatelaw_dummy  l4.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year ,  cluster(ccode)
	outreg2 using Robustness3.doc, dec(3) word label drop (i.year) append 


logistic climatelaw_dummy  l8.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year ,  cluster(ccode)
	outreg2 using Robustness3.doc, dec(3) word label drop (i.year) append 

  
logistic climatelaw_dummy  l10.NGO_shaming_Climateln l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal  l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year ,  cluster(ccode)
	outreg2 using Robustness3.doc, dec(3) word label drop (i.year) append 

  

  
  
  
  *####### FIGURE A3

  
   logit climatelaw_dummy  c.l2.NGO_shaming_Climateln##c.l.domesticENGOs l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
  margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.domesticENGOs =(0(0.39)2.2))  force
		marginsplot, recast(line) recastci(rarea) ylin(0)
		
	
		
		
 *####### FIGURE A5
		

**** OVERLAY HISTOGRAMS


twoway (histogram v2x_libdem, fcolor(gs14) bcolor(none)), name(hist, replace)


logit climatelaw_dummy c.l2.NGO_shaming_Climateln##c.l.v2x_libdem l.Climate_Agreement l.e_migdppcln l.wdi_trade l.co2_per_capitaln i.pt_federal l.wdi_popurb _prefail_cllaws _spline1_cllaws _spline2_cllaws _spline3_cllaws i.year, cluster(ccode)
margins, dydx(c.l2.NGO_shaming_Climateln) at(c.l.v2x_libdem =(0.005(0.1)0.892)) force
marginsplot, recast(line) recastci(rarea) ylin(0) name(mplot, replace)


graph combine mplot hist, ycommon xsize(6) ysize(3.5)






